<template>
	<view class="uni_box home">
		<navbar title='账户管理'>
		</navbar>
		<view class="content">
			<view class="srview" v-if="is_shenhe == 0">
				<view class="sclist">
					<view class="scitem" v-for="(item,index) in list" :key="index" @click.stop="getshoukuan(item)">
						<image class="icon_zfb" v-if="item.name=='支付宝'" src="@/pages_client/static/img/icon_zfb.png" mode="" />
						<image class="icon_zfb" v-if="item.name=='微信'" src="@/pages_client/static/img/icon_wx.png" mode="" />
						<image class="icon_zfb" v-if="item.name=='银行卡'" src="@/pages_client/static/img/icon_yhk.png" mode="" />
						<view class="sright">
							<view class="tione">
								<text class="tiname">{{ item.name }}</text>
								<text class="timiao ml" v-if="item.commission">{{item.commission}}</text>
							</view>
							<view class="titwo ml">
								<text class="tisjh">{{item.account.code}}</text>
								<view class="geng">
									<text>{{item.account==''?'添加':'更换'}}</text>
									<image class="icon_nexthui" src="@/pages_client/static/img/comm_icon_next.png" mode="" />
								</view>
							</view>
						</view>
					</view>
					<!-- <view class="scitem"  @click.stop="getshoukuan(2)">
						<image class="icon_zfb" src="@/pages_client/static/img/icon_wx.png" mode="" />
						<view class="sright">
							<view class="tione">
								<text class="tiname">微信</text>
								<text class="timiao ml">3%手续费</text>
							</view>
							<view class="titwo ml">
								<text class="tisjh">136****487</text>
								<view class="geng">
									<text>更换</text>
									<image class="icon_nexthui" src="@/pages_client/static/img/icon_nexthui.png" mode="" />
								</view>
							</view>
						</view>
					</view>
					<view class="scitem"  @click.stop="getshoukuan(3)">
						<image class="icon_zfb" src="@/pages_client/static/img/icon_yhk.png" mode="" />
						<view class="sright">
							<view class="tione">
								<text class="tiname">银行卡</text>
								<text class="timiao ml">3%手续费</text>
							</view>
							<view class="titwo ml">
								<view class="geng">
									<text>去绑定</text>
									<image class="icon_nexthui" src="@/pages_client/static/img/icon_nexthui.png" mode="" />
								</view>
							</view>
						</view>
					</view> -->
					
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tablist: [{
					name: '收入明细'
				}, {
					name: '奖励金明细'
				}],
				current: 0,
				list:[],
				is_shenhe:1,////1就是开启审核
			}
		},
		onLoad() {
			
		},
		onShow() {
			this.getshenhe()
			this.getlist()
		},
		methods: {
			async getshenhe(){
				let res = await this.$u.api.getShenhe({
				});
				if(res){

					if(!this.compareVersion(this.$store.state.Version,res.version)){
						//当前版本小于 接口返回版本
						this.is_shenhe = res.is_shenhe//1就是开启审核
						// #ifdef H5
						this.is_shenhe = 0
						//  #endif
					}else{
						//当前版本等于或者大于 接口返回版本 显示
						this.is_shenhe = 0
					}
				}
			},
			async getlist(){
				let res = await this.$u.api.getAccountList({
				});
				this.list = res
			},
			change(e){
				this.current = e
			},
			getshoukuan(e){
				let id = e.account.id
				if(!id||id==undefined){
					id = ''
				}
				this.navrouter("/pages_client/twoPage/M-ShouKuan?id="+id+'&type='+e.name);
			}
		}
	}
</script>

<style lang="scss" scoped>
	page{
		background-color: #fff;
	}
	.content{
		background-color: #fff;
		padding: 25rpx;
		min-height: 100vh;
		.qone{
			position: relative;
			height: 210rpx;
			width: 100%;
			
			.qbitem{
				position: relative;
				padding: 40rpx;
				display: flex;
				flex-direction: row;
				display: flex;
				flex-direction: row;
				align-items: center;
				.qbleft{
					display: flex;
					flex-direction: column;
					flex: 1;
					padding-right: 30rpx;

					.qbhead{
						display: flex;
						flex-direction: row;
						align-items: center;
						.sname{
							font-weight: 500;
							font-size: 26rpx;
							color: #FFFFFF;
						}
						.tixian{
							width: 100rpx;
							height: 44rpx;
							background: #FFFFFF;
							border-radius: 22rpx;
							display: flex;
							margin-left: auto;
							align-items: center;
							justify-content: center;
							font-weight: 500;
							font-size: 24rpx;
							color: #EA5918;
						}
					}
					.qian{
						font-weight: bold;
						font-size: 26rpx;
						color: #FFFFFF;
						margin-top: 25rpx;
						display: block;
					}
					.qiannum{
						font-size: 40rpx;
						display: inline-block;
						margin-left: 9rpx;
						top: 3rpx;
						position: relative;
					}
				}
				.qbleft:last-child{
					padding-right: 0;
					padding-left: 40rpx;
				}
			}
			.shu{
				width: 2rpx;
				height: 50rpx;
				background: #FFFFFF;
				opacity: 0.5;
				display: inline-block;
			}
		}
	}
	.srview{
		// margin: 40rpx 0 30rpx;
	}
	.sclist{
		.scitem{
			display: flex;
			padding:40rpx;
			background: #F5F5F5;
			border-radius: 20rpx;
			flex-direction: row;
			align-items: center;
			margin-bottom: 30rpx;
			.icon_zfb{
				width: 56rpx;
				height: 56rpx;
				margin-right: 20rpx;
			}
			.tuicon{
				margin-right: 20rpx;
				width: 80rpx;
				height: 80rpx;
			}
			.sright{
				// width: 80%;
				flex: 1;
				display: flex;
				flex-direction: row;
				.tione{
					display: flex;
					flex-direction: column;
					// align-items: center;
					// margin-bottom: 10rpx;
					.tiname{
						font-weight: bold;
						font-size: 28rpx;
						color: #333333;
					}
					.timiao{
						font-weight: 400;
						font-size: 24rpx;
						color: #666666;
						display: block;
						margin-top: 8rpx;
					}
					.tisjh{
						font-weight: 500;
						font-size: 28rpx;
						color: #111111;
					}
				}
				.titwo{
					display: flex;
					flex-direction: row;
					align-items: center;
				}
				.tione:last-child{
					margin-bottom: 0;
				}
				.geng{
					margin-left: 30rpx;
					display: flex;
					flex-direction: row;
					align-items: center;
					text{
						font-weight: 500;
						font-size: 24rpx;
						color: #999999;
					}
					.icon_nexthui{
						margin-left: 5rpx;
						width: 24rpx;
						height: 24rpx;
					}
				}
			}
		}
	}
</style>
